/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

(function( $ ){
  $.fn.showLeftContent = function() {
    var contentId = $(this).attr('content-id');
    //$("ul.list-option-menu li[name='left-menu-nav']").css('background', 'transparent');
    $("#of_nav_pane li[name='left-menu-nav']").removeClass('hover');
    //$("ul.list-option-menu li[name='left-menu-nav'] a").css('color', '#f1f1f1');
    $("#of_content_pane div.left-content").css('display', 'none')
    $("#" + contentId + "-content").fadeIn();
    $("#" + contentId + "-content").css('display', 'block');
    $("#of_nav_pane li."+contentId+"-nav").addClass('hover');
    window.location = window.location.href.substring(0, window.location.href.indexOf("#")) + "#" + contentId;
  };
})( jQuery );

$(function(){

    $("ul.list-option-menu li[name='left-menu-nav']").click(function(){            
      $(this).showLeftContent(); 
    });
    
    if (window.location.href.indexOf("#") != -1){
        var contentId = window.location.href.substring(window.location.href.indexOf("#") + 1);        
        $("ul.list-option-menu li[id='"+contentId+"nav']").click();
    }else{
         $("ul.list-option-menu li[id='generalnav']").click();
    }
    
    $("input[type='file']").uniform();
   
})

